Optimal. Leaf size=34 \[ -\frac{a^2 \sin (c+d x)}{d}-\frac{2 a^2 \log (1-\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0416049, antiderivative size = 34, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {2667, 43} \[ -\frac{a^2 \sin (c+d x)}{d}-\frac{2 a^2 \log (1-\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2667
Rule 43
Rubi steps
\begin{align*} \int \sec (c+d x) (a+a \sin (c+d x))^2 \, dx &=\frac{a \operatorname{Subst}\left (\int \frac{a+x}{a-x} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac{a \operatorname{Subst}\left (\int \left (-1+\frac{2 a}{a-x}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=-\frac{2 a^2 \log (1-\sin (c+d x))}{d}-\frac{a^2 \sin (c+d x)}{d}\\ \end{align*}
Mathematica [A] time = 0.019072, size = 29, normalized size = 0.85 \[ \frac{a^2 (-\sin (c+d x)-2 \log (1-\sin (c+d x)))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.042, size = 53, normalized size = 1.6 \begin{align*} 2\,{\frac{{a}^{2}\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}-2\,{\frac{{a}^{2}\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}-{\frac{{a}^{2}\sin \left ( dx+c \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.939936, size = 41, normalized size = 1.21 \begin{align*} -\frac{2 \, a^{2} \log \left (\sin \left (d x + c\right ) - 1\right ) + a^{2} \sin \left (d x + c\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.64804, size = 73, normalized size = 2.15 \begin{align*} -\frac{2 \, a^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + a^{2} \sin \left (d x + c\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} a^{2} \left (\int 2 \sin{\left (c + d x \right )} \sec{\left (c + d x \right )}\, dx + \int \sin ^{2}{\left (c + d x \right )} \sec{\left (c + d x \right )}\, dx + \int \sec{\left (c + d x \right )}\, dx\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.18736, size = 123, normalized size = 3.62 \begin{align*} \frac{2 \,{\left (a^{2} \log \left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right ) - 2 \, a^{2} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) - \frac{a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + a^{2}}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1}\right )}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]